home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / reiser4 / format.h < prev    next >
C/C++ Source or Header  |  2006-01-09  |  3KB  |  83 lines

  1. /* Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by
  2.    reiser4progs/COPYING.
  3.    
  4.    format.h -- public format functions. */
  5.  
  6. #ifndef REISER4_FORMAT_H
  7. #define REISER4_FORMAT_H
  8.  
  9. #include <reiser4/types.h>
  10.  
  11. extern reiser4_format_t *reiser4_format_open(reiser4_fs_t *fs);
  12.  
  13. #ifndef ENABLE_MINIMAL
  14. extern errno_t reiser4_format_sync(reiser4_format_t *format);
  15. extern void reiser4_format_mkdirty(reiser4_format_t *format);
  16. extern void reiser4_format_mkclean(reiser4_format_t *format);
  17. extern bool_t reiser4_format_isdirty(reiser4_format_t *format);
  18.  
  19. extern reiser4_format_t *reiser4_format_create(reiser4_fs_t *fs,
  20.                            reiser4_plug_t *plug,
  21.                            rid_t policy,
  22.                            rid_t key,
  23.                            count_t blocks);
  24.  
  25. extern errno_t reiser4_format_backup(reiser4_format_t *format,
  26.                      backup_hint_t *hint);
  27.  
  28. extern errno_t reiser4_format_layout(reiser4_format_t *format, 
  29.                      region_func_t func,
  30.                      void *data);
  31.  
  32. extern void reiser4_format_set_root(reiser4_format_t *format, 
  33.                     blk_t root);
  34.  
  35. extern void reiser4_format_set_len(reiser4_format_t *format, 
  36.                    count_t blocks);
  37.  
  38. extern void reiser4_format_set_free(reiser4_format_t *format, 
  39.                     count_t blocks);
  40.  
  41. extern void reiser4_format_set_height(reiser4_format_t *format, 
  42.                       uint8_t height);
  43.  
  44. extern void reiser4_format_set_stamp(reiser4_format_t *format, 
  45.                      uint32_t stamp);
  46.  
  47. extern void reiser4_format_set_policy(reiser4_format_t *format, 
  48.                       uint16_t policy);
  49.  
  50. extern errno_t reiser4_format_mark(reiser4_format_t *format, 
  51.                    reiser4_alloc_t *alloc);
  52.  
  53. extern count_t reiser4_format_len(aal_device_t *device, uint32_t blksize);
  54.  
  55. extern errno_t reiser4_format_check_len(aal_device_t *device, 
  56.                     uint32_t blksize, 
  57.                     count_t blocks);
  58.  
  59. extern errno_t reiser4_format_valid(reiser4_format_t *format);
  60. extern rid_t reiser4_format_oid_pid(reiser4_format_t *format);
  61. extern rid_t reiser4_format_alloc_pid(reiser4_format_t *format);
  62. extern rid_t reiser4_format_journal_pid(reiser4_format_t *format);
  63.  
  64. extern blk_t reiser4_format_start(reiser4_format_t *format);
  65. extern count_t reiser4_format_get_len(reiser4_format_t *format);
  66. extern count_t reiser4_format_get_free(reiser4_format_t *format);
  67. extern const char *reiser4_format_name(reiser4_format_t *format);
  68. extern uint32_t reiser4_format_get_stamp(reiser4_format_t *format);
  69. extern uint16_t reiser4_format_get_policy(reiser4_format_t *format);
  70. extern blk_t reiser4_format_get_root(reiser4_format_t *format);
  71.  
  72. extern errno_t reiser4_format_inc_free(reiser4_format_t *format,
  73.                        count_t count);
  74.  
  75. extern errno_t reiser4_format_dec_free(reiser4_format_t *format,
  76.                        count_t count);
  77. #endif
  78.  
  79. extern void reiser4_format_close(reiser4_format_t *format);
  80. extern uint16_t reiser4_format_get_height(reiser4_format_t *format);
  81. #endif
  82.  
  83.